//------------Sonic CD LoveHeart Script-------------//
//--------Scripted by Christian Whitehead 'The Taxman'--------//
//-------Unpacked By Rubberduckycooly's Script Unpacker-------//

//-------Aliases-------//
#alias 65: TYPE_LOVEHEART


sub ObjectDraw
	if Object.Value0>144
		TempValue0=Object.Value0
		TempValue0-=144
		TempValue0<<=3
		if TempValue0>255
			TempValue0=255
		endif
		Object.Alpha=255
		Object.Alpha-=TempValue0
		if Object.Alpha==0
			Object.Type=TypeName[BlankObject]
		endif
	endif
	Sin(TempValue0,Object.Value1)
	TempValue0<<=9
	TempValue0+=Object.XPos
	if Object.Value0>19
		DrawSpriteFX(1,FX_INK,TempValue0,Object.YPos)
	else
		DrawSpriteXY(0,TempValue0,Object.YPos)
	endif
	Object.YPos-=24576
	Object.Value1+=8
	Object.Value1&=511
	Object.Value0++
endsub


sub ObjectStartup
	LoadSpriteSheet("R1/Objects.gif")
	SpriteFrame(-8,-8,16,16,193,134)
	SpriteFrame(-8,-8,16,16,193,150)
endsub

sub RSDK
	LoadSpriteSheet("Global/Display.gif")
	SetEditorIcon(Icon0,SingleIcon,-16,-16,32,32,1,143)
endsub
